package org.niux.aims.models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Auth entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "auth", catalog = "aims")
public class Auth implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 7346455396497347078L;
	private Integer id;
	private Entitys entitys;
	private Account account;

	// Constructors

	/** default constructor */
	public Auth() {
	}

	/** full constructor */
	public Auth(Entitys entitys, Account account) {
		this.entitys = entitys;
		this.account = account;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ENTITYS_ID", nullable = false)
	public Entitys getEntitys() {
		return this.entitys;
	}

	public void setEntitys(Entitys entitys) {
		this.entitys = entitys;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ACCOUNT_ID", nullable = false)
	public Account getAccount() {
		return this.account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

}